package com.exp.bookhouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.exp.bookhouse.pojo.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface CategoryMapper extends BaseMapper<Category> {

    @Delete("delete from tb_book where category_id = #{id}")
    void deleteBookByCategoryId(Long id);

}
